package com.epam.submenu.submenu1;

import java.util.ArrayList;
import java.util.List;

import com.epam.menu.Menu;
import com.epam.menu.MenuItem;
import com.epam.submenu.submenu1.submenu1_2.*;

public class Order2 extends MenuItem {
	private final Menu subMenu;
	
	public Order2() {
		super("Second-order", "2");
		List<MenuItem> items = new ArrayList<MenuItem>();
		items.add(new AlexandriteMenu());
		items.add(new OpalBlackMenu());
		items.add(new SapphireRosyMenu());
		items.add(new GoBack1_2());
		subMenu = new Menu(items);
	}

	@Override
	public boolean execute() {
		System.out.println("Second-order comand");
		subMenu.run();
		return true;
	}

}
